<template>
	<!-- 房屋详情 -->
	<view class="hourseinfo-container">
		<view class="hourseinfo-head">
			<view class="head-top">
				<view class="top-1">
					<image v-if="info.houseImgs == '' || info.houseImgs == null" src="../../../../static/infor/house.jpg"></image>
					<image v-else :src="info.houseImgs"></image>
				</view>
				<view class="top-2">
					<view class="top-2-1">{{info.fullName}}</view>
					<view class="top-2-2">{{info.houseType_dictText}}</view>
				</view>
			</view>
			<view class="head-bottom">
				<view class="bottom-item">
					<view class="item-left">房主</view>
					<view class="item-right">{{info.houseHolderName || '暂无资料'}}</view>
				</view>
				<view class="bottom-item">
					<view class="item-left">房屋是否落户</view>
					<view class="item-right">是</view>
				</view>
				<view class="bottom-item">
					<view class="item-left">联系电话</view>
					<view class="item-right">{{info.houseHolderPhone || '暂无资料'}}</view>
				</view>
				<view class="bottom-item">
					<view class="item-left">房屋居住人员数</view>
					<view class="item-right">{{info.houseMemberNum}}人</view>
				</view>
				<view class="bottom-item">
					<view class="item-left">房屋地址</view>
					<view class="item-right">{{info.address || '暂无资料'}}</view>
				</view>
				<view class="bottom-item">
					<view class="item-left">简介</view>
					<view class="item-right">{{info.synopsis || '暂无资料'}}</view>
				</view>
			</view>
		</view>
		<view class="info-basic">
			<view class="basic-head">
				<view class="head-1">居住人员信息</view>
				<view class="head-2"><image src="../../../../static/icon/jiapopu.png"></image></view>
			</view>
			<view class="basic-con">
				<view class="con-item" @click="goPopulationInfo">
					<view class="item-left">{{ info.houseHolderName }}<text></text></view>
					<view class="item-right">身份证号<text>{{ info.resIdCard || '暂无资料' }}</text></view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default{
		data() {
			return{
				info:{}
			}
		},
		onLoad() {
			this.info = JSON.parse(uni.getStorageSync("info"))
			console.log(this.info)
			uni.setNavigationBarTitle({
				title:this.info.fullName
			})
		},
		onNavigationBarButtonTap() {
			uni.navigateTo({
				url:'../EditHouse/EditHouse?id=' + this.info.id 
			})
		},
		methods:{
			goPopulationInfo() {
				uni.navigateTo({
					url:'../../Population/Population-info/Population-info'
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.hourseinfo-container{
		padding: 20rpx;
		background-color: #f5f6f7;
		min-height: 100vh;
		.hourseinfo-head{
			border-radius: 10rpx;
			padding: 20rpx;
			background-color: #fff;
			box-shadow: 3px 3px 3px #eee;
			.head-top{
				display: flex;
				justify-content: flex-start;
				align-items: center;
				.top-1{
					width: 120rpx;
					height: 120rpx;
				}
				.top-2{
					display: flex;
					justify-content: center;
					align-items: flex-start;
					flex-direction: column;
					margin-left: 20rpx;
					.top-2-1{
						color: #333;
						font-size: 30rpx;
					}
					.top-2-2{
						color: #999;
						font-size: 25rpx;
						margin-top: 10rpx;
					}
				}
			}
			.head-bottom{
				.bottom-item{
					padding: 10rpx 0;
					color: #999;
					font-size: 28rpx;
					display: flex;
					justify-content: flex-start;
					align-items: center;
					.item-left{}
					.item-right{
						margin-left: 20rpx;
					}
				}
			}
		}
		.info-basic{
			width: 100%;
			border-radius: 10rpx;
			margin-top: 20rpx;
			box-shadow: 3p 3px 3px #eee;
			.basic-head{
				color: #000;
				font-size: 30rpx;
				font-weight: 600;
				background-image: linear-gradient(to right,#e6eefd,#fdfdfd);
				padding: 20rpx;
				display: flex;
				justify-content: space-between;
				align-items: center;
				.head-1{}
				.head-2{
					width: 50rpx;
					height: 50rpx;
				}
			}
			.bsic-content{
				background-color: #fff;
				
				.basic-item{
					display: flex;
					justify-content: flex-start;
					align-items: center;
					font-size: 28rpx;
					padding: 20rpx;
					.item-left{
						color: #999;
						width: 20%;
					}
					.item-right{
						color: #333;
						width: 80%;
						padding-left: 20rpx;
					}
				}
			}
			.basic-con{
				background-color: #fff;
				padding: 20rpx;
				.con-item{
					padding: 20rpx;
					background-color: #eceefc;
					border-radius: 10rpx;
					margin-bottom: 10rpx;
					.item-left{
						color: #000;
						font-size: 28rpx;
						margin-bottom: 10rpx;
						text{
							color: #007AFF;
							font-size: 23rpx;
							display: inline-block;
							margin-left: 20rpx;
						}
					}
					.item-right{
						color: #3F536E;
						font-size: 25rpx;
						text{
							display: inline-block;
							margin-left: 20rpx;
							font-size: 23rpx;
							color: #333;
						}
					}
				}
			}
		}
	}
</style>